package test7;


import com.tyfspring.beans.config.*;
import com.tyfspring.beans.exception.BeansException;
import com.tyfspring.beans.factory.ConfigurableListableBeanFactory;
import com.tyfspring.beans.factory.DefaultListableBeanFactory;

/**
 * @Description TODO
 * @Author shallow
 * @Date 2023/4/10 19:40
 */

public class MyBeanFactoryPostProcessor implements BeanFactoryPostProcessor {
    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
        BeanDefinition beanDefinition = beanFactory.getBeanDefinition("userService"
        );
        PropertyValues propertyValues = beanDefinition.getPropertyValues();
        propertyValues.addPropertyValue(new PropertyValue("company", "改为：字节跳动"));

    }


}
